#ifndef SPEEX_JNI_H
#define SPEEX_JNI_H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct SpeexEncoder SpeexEncoder;
typedef struct SpeexDecoder SpeexDecoder;

SpeexEncoder* speex_encoder_init_wrapper(int quality, int sample_rate);
int           speex_encode_frame(SpeexEncoder*, short* pcm, char* out, int max_len);
int           speex_get_frame_size(SpeexEncoder*);
void          speex_encoder_destroy_wrapper(SpeexEncoder*);

SpeexDecoder* speex_decoder_init_wrapper(void);
int           speex_decode_frame_wrapper(SpeexDecoder*, char* in, int in_len, short* out);
int           speex_get_frame_size_decoder(SpeexDecoder*);
void          speex_decoder_destroy_wrapper(SpeexDecoder*);

#ifdef __cplusplus
}
#endif
#endif